******************************************************************************
* Panel (a): East Baton Rouge 
******************************************************************************

use dataset_east_baton_rouge_cross, clear

* yes vote on state ref is fiscally cons
//replace pctyes_placebo = -pctyes_placebo + 1
replace pctyes = -pctyes + 1

* 2020 only
keep if year == 2020

* plot
#delimit;

gr tw
	(sc pctyes_placebo pctyes [aw=totalvotes_placebo], col(gray)
		msym(Oh) msize(small))
	(lpoly pctyes_placebo pctyes [aw=totalvotes_placebo], col(black)
		lwid(thick))
	//(function y=x, range(0 1))
	,
		plotregion(style(none))
		xtitle("Share Voting Against Police Funding")
		ytitle("Share Voting to Limit State Budget")
		ylab(, angle(horiz))
		legend(off)
		title("(a) East Baton Rouge")
		name(g1, replace)
		;
		
#delimit cr

gr close

******************************************************************************
* Panel (b): Fort Worth
******************************************************************************

use dataset_fort_worth_cross, clear

* yes vote is liberal on placebo
replace pctyes_placebo = -pctyes_placebo + 1
replace pctyes = -pctyes + 1

* 2020 only
keep if year == 2020

* plot
#delimit;

gr tw
	(sc pctyes_placebo pctyes [aw=totalvotes_placebo], col(gray)
		msym(Oh) msize(small))
	(lpoly pctyes_placebo pctyes [aw=totalvotes_placebo], col(black)
		lwid(thick))
	//(function y=x, range(0 1))
	,
		plotregion(style(none))
		xtitle("Share Voting Against Police Funding")
		ytitle("Share Voting Against Education Funding")
		ylab(, angle(horiz))
		legend(off)
		title("(b) Fort Worth")
		name(g2, replace)
		;

#delimit cr

gr close

******************************************************************************
* Combine
******************************************************************************

gr combine g1 g2, xsize(2) ysize(1)
gr export "_output/figure A21.pdf", replace

******************************************************************************
* End
******************************************************************************
